class CreateTerminals < ActiveRecord::Migration
  def change
    remove_column :installations, :app_version
    remove_column :installations, :is_app
    change_column :installations, :note, :text 

    create_table :terminals do |t|
      t.string   "name"
      t.string   "version"
      t.string   "size"
      t.string   "logo"
      t.string   "file"
      t.text     "note"
      t.integer  "seq",              :default => 1
      t.string   "file_size"
      t.string   "content_type"
      t.string   "support_versions"
      t.boolean  "release",          :default => false
      t.string   "version"
      t.timestamps
    end
    create_table :installations_terminals do |t|
      t.integer  :installation_id
      t.integer  :terminal_id
    end

    add_index :installations_terminals, :installation_id
    add_index :installations_terminals, :terminal_id

  end
end
